unit MLPAReinsertProbes;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls, CheckLst;

type
  TdlgReinsertProbes = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    Bevel1: TBevel;
    clbProbes: TCheckListBox;
    Label1: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
    function DoDialog(ExcludedProbes,dataList: TStringList):boolean;
  end;

var
  dlgReinsertProbes: TdlgReinsertProbes;

implementation
uses MLPAdm;
{$R *.DFM}

{ TdlgReinsertProbes }

function TdlgReinsertProbes.DoDialog(ExcludedProbes,dataList: TStringList):boolean;
var
  i,ProbeId: integer;
  ProbeInfo:TProbeInfo;
begin
  result:=false;
  clbProbes.Items.Clear;
  for i:=0 to ExcludedProbes.Count-1 do
  begin
    ProbeId:=datalist.IndexOf(ExcludedProbes[i]);
    if ProbeId>=0 then
    begin
      ProbeInfo:=TProbeInfo(datalist.Objects[probeid]);
      clbProbes.items.Add(ProbeInfo.id+'  '+ProbeInfo.cytoband+'  '+ProbeInfo.gene);
    end
    else begin
      clbProbes.items.Add('---'+ExcludedProbes[i]+'---');
    end;
  end;
  If ShowModal=mrOK then
  begin
    for i:=clbProbes.Items.Count-1 downto 0 do
    begin
      if clbProbes.Checked[i] then
      begin
        ExcludedProbes.Delete(i);
        result:=true;
      end;
    end;
  end;
end;

end.
